package com.tienon.message.service;

import java.util.List;
import java.util.concurrent.Future;

import org.springframework.stereotype.Service;

import com.tienon.message.entity.Raw_msg_batch;
import com.tienon.message.thread.LoadRawMsgTasks;

/**
 * 加载原始表服务
 *  
 * @author xiuye
 *
 */
@Service
public class LoadRawMsgService {

	/**
	 * 载入单个原始表数据
	 * @param data
	 * @return
	 */
	public  Future<Boolean> loadRawMsgTask(Raw_msg_batch data){
		
		return LoadRawMsgTasks.loadRawMsgTask(data);
		
	}
	/**
	 * 载入多个原始表数据
	 * @param datas
	 * @return
	 */
	public  List<Future<Boolean>> loadRawMsgTasks(List<Raw_msg_batch> datas){
		
		
		return LoadRawMsgTasks.loadRawMsgTasks(datas);
	}
	/**
	 * 关闭服务
	 */
	public void close(){
		LoadRawMsgTasks.closeTasks();
	}
	/**
	 * 重启服务
	 */
	public void rebootService(){
		LoadRawMsgTasks.openTasks();
	}
}
